package com.vpen.account.demo.model.dto;

import cn.hutool.crypto.asymmetric.RSA;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 描述
 *
 * @author 韦鹏
 * @date 2022/7/19 11:52
 */
@Data
@Accessors(chain = true)
public class RsaKeyDto implements Serializable {
    private static final long serialVersionUID = 16789145464651322L;
    /**
     * 私钥
     */
    private String privateKey;
    /**
     * 公钥
     */
    private String publicKey;

    public RsaKeyDto() {
        RSA rsa = new RSA();
        this.publicKey = rsa.getPublicKeyBase64();
        this.privateKey = rsa.getPrivateKeyBase64();
    }


}
